home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 1 / dosdoc.zip / DOSDOC.TXT
Text File  |  1987-05-21  |  19KB  |  454 lines

  1. ********************************************************************************
  2. * This represents a summary of MS-DOS & PC-DOS versions 3.1 & 3.2.  Not all of *
  3. * the commands will be present nor will the syntax necessarily be the same for *
  4. * each version of DOS.  Feel free to modify this for whatever version you use. *
  5. * Please let me know of any corrections that are needed.  JEB HAMILTON 5/20/87 *
  6. ********************************************************************************
  7.  
  8.  
  9.  
  10. Internal Commands
  11. =================
  12. BREAK              CHDIR (CD)          CLS                 COPY
  13. CTTY               DATE                DIR                 ECHO
  14. ERASE (DEL)        EXIT                FOR                 GOTO
  15. IF                 MKDIR (MD)          PATH                PAUSE
  16. PROMPT             REM                 RENAME (REN)        RMDIR (RM)
  17. SET                SHIFT               TIME                TYPE
  18. VER                VERIFY              VOL
  19.  
  20.  
  21. External Commands
  22. =================
  23. APPEND             ASSIGN              ATTRIB              BACKUP
  24. CHKDSK *           CHMOD               COMMAND             COMP
  25. CONFIGUR           DEBUG               DISKCOMP *          DISKCOPY *
  26. EDLIN              EXE2BIN             FC                  FDISK *
  27. FIND               FORMAT *            GRAFTABL            GRAPHICS
  28. JOIN *             KEYBxx              LABEL *             LINK
  29. MODE               MORE                PRINT *             RECOVER *
  30. REPLACE            RESTORE             SELECT              SHARE
  31. SIZE               SORT                SUBST *             SYS *
  32. TREE               XASSIGN             XCOPY
  33.  
  34. * - cannot be used on a network
  35.  
  36.  
  37. SYS Commands
  38. ============
  39. CONFIG             ANSI                DRIVER              VDISK
  40.  
  41.  
  42.  
  43. Valid Characters for Filenames
  44. ==============================
  45. A-Z (a-z made uppercase) 0-9 ! # $ % & ' ( ) - @ ^ _ ` { } ~
  46. : .  file separator (drive:name.ext)   b/ , ; = TAB   delimiters/separators
  47. *    multi character wildcard          ?   single character wildcard
  48. <    redirect input                    >   redirect output (>> appends file)
  49. /    optional switch                   \   path or directory
  50. |    piping for additional commands    " + [ ] DEL   not used
  51.  
  52.  
  53.  
  54. Valid Device Names
  55. ==================
  56. PRN                LPT1                LPT2                LPT3
  57. AUX                COM1                COM2
  58. CON                NUL
  59. don't use for filenames                ok to use for extensions
  60.  
  61. Editing Keys
  62. ============
  63. F1 - copy one character                F3 - copy remaining characters
  64. F2 c - copy up to "c"                  F4 c - skip up to "c"
  65. F5 - save input, give new line         F6 - End Of File marker
  66.  
  67. Ins - insert mode on/off               Del - delete one character
  68. Backspace - left space & delete        Ctrl H - left space & delete
  69. Tab - move 8 spaces right              Ctrl I - move 8 spaces right
  70. Esc - cancel current line              Ctrl [ - cancel current line
  71.  
  72. Ctrl C - abort command                 Ctrl Scroll Lock - abort command
  73. Ctrl S - pause screen output           Ctrl Num Lock - pause screen output
  74. Ctrl P - toggle output to printer      Ctrl PrtSc - toggle output to printer
  75. Ctrl J - End Of Line marker            Ctrl Z - End Of File marker
  76.  
  77.  
  78.  
  79. EDLIN Commands
  80. ==============
  81. n                  edit line n
  82. #                  edit new line (at end of text)
  83. + or - n           list +/- n lines from current line ("*")
  84. b,e L              list text beginning at b, ending at e
  85. b,e P              page text beginning at b, ending at e
  86.  
  87. a I                insert text at line a
  88. b,e D              delete text beginning at b, ending at e
  89. b,e,a,c C          copy text beginning at b, ending at e, at line a, c times
  90. b,e,a M            move text beginning at b, ending at e, at line a
  91. b,e ? S string     search for string in text beginning at b, ending at e
  92. b,e ? R s1 F6 s2   replace string1 with string2 (? asks each time)
  93.  
  94. n W                write n lines (from line 1) to disk
  95. n A                append n lines from disk to the end of text
  96. a T file           transfer file from disk and insert at line a
  97.  
  98. E                  end edit & save file
  99. Q                  quit edit & do not save file
  100.  
  101. Ctrl V X           will give a Ctrl X (use for any Ctrl character)
  102. /B switch          ignore Ctrl Z, edit entire file
  103.  
  104.  
  105.  
  106. DEBUG Commands
  107. ==============
  108. E address list     enter               G =address         go (execute)
  109.                                        P =address value   proceed
  110. C range address    compare             T =address value   trace
  111. M range address    move
  112. F range list       fill                N file             name
  113. S range list       search              L addr sect sect   load
  114.                                        W addr sect sect   write
  115. A address          assemble
  116. U addr or range    unassemble          R register         register
  117. D addr or range    dump                H value value      hex math
  118.                                        I value            input
  119. Q                  quit                O value byte       output
  120.  
  121. PROMPT Commands
  122. ===============
  123. PROMPT text
  124.  
  125. $d ..... date                $t ...... time                $v ...... version
  126. $n ..... drive               $p ...... directory           $_ ...... CRLF
  127. $g ..... >                   $l ...... <                   $e ...... ESC
  128. $b ..... |                   $q ...... =                   $$ ...... $
  129. $h ..... backspace           $s ...... leading space       c  ...... character
  130.  
  131. ANSI Escape Sequences
  132. =====================
  133. PROMPT $e[#A       (replace # & A with below, omitting any spaces shown)
  134.  
  135. #;# H              cursor position - row;column
  136. #;# f              cursor position - row;column
  137. # A                up # lines
  138. # B                down # lines
  139. # C                right # lines
  140. # D                left # lines
  141.  
  142. 0 J or J           erase from cursor to end of display
  143. 1 J                erase from beginning of display to cursor
  144. 2 J                erase all of display
  145. 0 K or K           erase from cursor to end of line
  146. 1 K                erase from beginning of line to cursor
  147. 2 K                erase all of line
  148.  
  149. > 5 h              make cursor invisible
  150. > 5 l              make cursor visible
  151. s                  save cursor position
  152. u                  restore cursor position
  153. #;# R              cursor position report (CPR)
  154. 6 n                perform CPR when DSR received
  155.  
  156. #;# r              set screen size (1;25 default)
  157. c                  display screen size
  158. l s                save character attributes
  159. l u                restore character attributes
  160.  
  161. #;#;# m            graphics commands
  162.                     0 - all attrib off  1 - bold on         3 - swap fgc & bgc
  163.                     4 - underscore on   5 - blink on        7 - reverse on
  164.                     8 - invisible on   81 - bold off       84 - underscore off
  165.                    85 - blink off      87 - reverse off    88 - invisible off
  166.                    30 to 37 - foreground colors
  167.                    40 to 47 - background colors
  168.                    48 to 55 - background colors (high intensity)
  169.  
  170. =# h or =# l       screen commands
  171. set     reset       0 - 40x25 B&W       1 - 40x25 COL       2 - 80x25 B&W
  172.                     3 - 80x25 COL       4 - 320x200 COL     5 - 320x200 B&W
  173.                     6 - 640x200 B&W    64 - 640x400 80x25  72 - 640x400 80x50
  174.                     7 - wrap at end of line
  175.  
  176. #;#;# p            reassign keys (ex - 65;90p has "A" key display "Z")
  177. 0;#;"string";13p   assign words to keys (ex - 0;68;"DIR";13p has "F10" give DIR)
  178. 0 q                disables key reassignments
  179. 1 q                enables key reassignments
  180.  
  181. CONFIG.SYS File
  182. ===============
  183. BUFFERS=#                              2 default, 20 good
  184.  
  185. FCBS=x,y                               4,0 default, 4,0 good
  186.  
  187. FILES=#                                8 default, 20 good
  188.  
  189. COUNTRY=xxx                            001 for USA symbols
  190.  
  191. LASTDRIVE=Z                            E default (use with SUBST)
  192.  
  193. SHELL=file                             for your own command processor
  194.  
  195. DEVICE=ANSI.SYS                        driver for ANSI graphics (see PROMPT)
  196.  
  197. DEVICE=DRIVER.SYS                      install unusual disk drive
  198. /D:drive # (0-255)           /T:tracks per side (1-999)    /S:sec per trk (1-99)
  199. /F:device type # (0-2)       /H:# of heads (1-99)          /N - fixed disk
  200.  
  201. DEVICE=VDISK.SYS bs ss ds              install RAM disk drive
  202. bs=buffer size (64K)         ss=sector size (128)          ds=dir size (64)
  203. /E:max sectors transferred (8) use with Extended Memory
  204.  
  205.  
  206.  
  207. .BAT Files
  208. ==========
  209. BREAK ON or OFF                        enable/disable Ctrl-Break/Ctrl-C
  210.  
  211. VERIFY ON or OFF                       automatic verify when COPY is used
  212.  
  213. ECHO ON or OFF                         toggle message display on/off
  214. ECHO message                           display message
  215.  
  216. REM message                            display message (w/REM displaying)
  217.  
  218. PAUSE message                          display message & pause execution
  219.  
  220. SET string1=string2                    reassign environment names that are used
  221. SET COMSPEC=C:\                        looks for COMMAND.COM in drive C:
  222.  
  223. EXAMPLE.BAT                            using replaceable parameters (%0 - %9)
  224. TYPE %1                                typing EXAMPLE YOUR.DOC
  225. SET FILE2=MY.DOC                       displays the file YOUR.DOC
  226. TYPE %FILE2%                           displays the file MY.DOC
  227.  
  228. SHIFT                                  delete %0 value, move %1-%9 up one slot
  229.  
  230. FOR %%V IN (files) DO command          assign files to a variable (A-Z)
  231. FOR %%V IN (*.DOC) DO TYPE %%V         display contents of all *.DOC files
  232.  
  233. IF or IF NOT condition command         conditional processing of commands
  234.              ERRORLEVEL #              FORMAT BACKUP RESTORE set error level #
  235.              string1==string2
  236.              EXIST file
  237.  
  238. GOTO label                             transfer to another part of batch file
  239. :label                                 :comment can be used for documentation
  240.  
  241. Directory Commands
  242. ==================
  243. DIR                                    display the filenames on a disk
  244. /P ..... pause each screen   /W ...... display 5 names across
  245.  
  246. MKDIR or MD name or \name              make a new directory (\ starts at root)
  247.  
  248. CHDIR or CD name or \name              change the current directory
  249.          CD ..                         go to parent directory
  250.          CD \                          go to root directory
  251.  
  252. RMDIR or RD name or \name              delete existing directory (must be empty)
  253.  
  254. PATH \subdir1;\subdir2;\subdir3        search each subdirectory for commands
  255.  
  256. TREE /F                                show each subdir & files
  257. TREE /V                                show each subdir & files & stats
  258.  
  259.  
  260.  
  261. Disk Commands
  262. =============
  263. VER                                    display DOS version
  264.  
  265. FDISK                                  menu for partitioning hard drive
  266.  
  267. FORMAT drive                           prepare disk for storage
  268. /S ..... copies OS           /V ...... volume name         /B ...... room for OS
  269. /1 ..... single sided        /8 ...... 8 sectors           /4 ...... 360 on 1.2
  270. /Txx ... tracks per side     /Nxx .... sectors per track
  271.  
  272. SYS drive                              copy OS (2 files) to disk
  273.  
  274. VOL                                    display volume name of disk
  275.  
  276. LABEL volumename                       add/change volume name of disk
  277.  
  278. ATTRIB switch file                     change Read-Only attribute of file
  279. +R ..... make Read-Only      -R ...... make Read-Write
  280.  
  281. CHMOD switch file                      change all the attributes of file
  282. + A(rchive) H(idden) R(ead-only) S(ystem) sets the attribute bit
  283. - A(rchive) H(idden) R(ead-only) S(ystem) resets the attribute bit
  284.  
  285. APPEND drive1\path1;drive2\path2       set a search path for files across drives
  286.                                        type APPEND first if using ASSIGN
  287.  
  288. ASSIGN drive1=drive2 (no colons)       accesses to drive1 will now go to drive2
  289.  
  290. XASSIGN drive1=drive2                  accesses to name1 will now go to name2
  291.         file1=file2
  292.         path1=path2
  293. /D ..... remove assignment   /L ...... list assignment
  294.  
  295. JOIN drive1 drive2\newpath             accesses to newpath will now go to drive1
  296. /D ..... remove joining                newpath must be empty
  297.  
  298. SUBST drive path                       assign a drive letter to a subdirectory
  299. /D ..... remove substitution           be sure to change LASTDRIVE
  300.  
  301. CHKDSK drive or file                   check integrity of disk
  302. /F ..... correct errors      /V ...... display messages
  303.  
  304. RECOVER drive or file                  try to recover lost or bad data
  305.  
  306. BACKUP drive1:files drive2             backup files on disk (files are packed)
  307. /S ..... include subdir      /M ...... only modified files /A ...... add files
  308. /D:mm-dd-yy (after date)     /T:hh-mm-ss (after time)      /L ...... create log
  309.  
  310. RESTORE drive1 drive2                  restore files to disk
  311. /S ..... include subdir      /M ...... only modified files /N ...... new files
  312. /B or /A:mm-dd-yy (by date)  /E or /L:hh-mm-ss (by time)   /P ...... OK prompt
  313.  
  314. DISKCOPY drive1 drive2                 copy entire disk (by track)
  315. /1 ..... single sided
  316.  
  317. DISKCOMP drive1 drive2                 compare two disks (by track)
  318. /1 ..... single sided        /8 ...... 8 sectors
  319.  
  320. COPY file1 file2  or  f1+f2 file3      copy entire files
  321.      *.ext file3  or  *.ext1+*.ext2 *.ext3  or  ALL.DOC+*.DOC (to ALL.DOC)
  322. /V ..... verify copy         /A ...... ASCII file          /B ...... binary file
  323.  
  324. XCOPY drive1 drive2                    enhanced version of COPY
  325. /A ..... archive, bit set    /M ...... archive, bit reset  /E ...... copy subdir
  326. /S ..... copy lower subdir   /P ...... OK prompt           /W ...... wait prompt
  327. /V ..... verify copy         /D:mm-dd-yy (after date)
  328.  
  329. COMP file1 file2                       compare two files
  330.  
  331. FC switch file1 file2                  enhanced version of COMP
  332. /a ..... show beg/end lines  /n ...... show line #         /lb# .... max lines
  333. /l ..... ASCII files         /b ...... byte by byte        /# ...... # for match
  334. /t ..... tabs =/ 8 spaces     /w ...... compress spaces     /c ...... ignore case
  335.  
  336. REPLACE files drive                    replace previous versions of files
  337. /A ..... add new files       /S ...... replace same files  /R ...... read-only
  338. /P ..... OK prompt           /W ...... wait prompt
  339.  
  340. RENAME or REN file1 file2              change the name of a file
  341.  
  342. ERASE or DEL file                      delete a file
  343.  
  344. SIZE drive or file                     display file size and disk space needed
  345.  
  346. TYPE file                              display contents of an ASCII file
  347.  
  348. PRINT file                             buffer printing from disk
  349. /D:printer device (PRN)      /B:buffer size (512)          /Q:queue size (10)
  350. /U:busy tick to wait (1)     /M:max tick to print (2)      /S:time slice (8)
  351. /T delete queue              /C cancel printing            /P begin printing
  352.  
  353. SHARE                                  for sharing files on a network
  354. /F:space (2048)              /L:locks (20)
  355.  
  356. ********************************************************************************
  357. *   FORMAT DISKCOPY DISKCOMP BACKUP RESTORE LABEL PRINT should not be used if  *
  358. *   ASSIGN XASSIGN JOIN SUBST are in affect (use /D to remove)                 *
  359. ********************************************************************************
  360.  
  361. MODE & CONFIGUR Commands
  362. ========================
  363. MODE 40 or 80 or BW40 or BW80 or CO40 or CO80 or MONO, R or L, T
  364.                                  screen type, shift 1 position, show test pattern
  365.  
  366. CONFIGUR SCREEN  C  foreground  background  width  or  M  character  width
  367.                     first 3 letters      40 or 80         n=normal r=reverse
  368.  
  369. MODE COM#:baud, parity, data bits, stop bits, P (printer retry)
  370.  
  371. baud=110-9600 parity=N,E,O data=7,8 stop=1,2 port=Xon,Etx,None CD-RTS=Low,Hi,Ign
  372.  
  373. CONFIGUR PORT  #  baud  stop bits  data bits  parity  port  CD CTS DTR RTS
  374.  
  375. MODE LPT#:=COM#                  LPT# - 1,2,3               COM# - 1,2
  376.  
  377. CONFIGUR REROUTE logical=assign  logical - LPT1,2,3 COM1,2  assign - PAR1 SER1,2
  378.  
  379. MODE LPT#:80 or 132, 6 or 8, P (retry on error for printer)
  380.  
  381.  
  382.  
  383. Filter Commands
  384. ===============
  385. FIND switch "string" file              find a string in a file
  386. /V ..... show lines not in   /C ...... count of lines      /N ...... show line #
  387.  
  388. SORT switch <filein >fileout           sort a file (filein=/fileout)
  389. /R ..... reverse order       /+n ..... start at column n
  390.  
  391. MORE <file or command|MORE             pause display every 23 lines
  392.  
  393.  
  394.  
  395. Other Commands
  396. ==============
  397. CLS                                    clear the screen
  398.  
  399. DATE mm-dd-yy                          set the date
  400.  
  401. TIME hh:mm:ss                          set the time
  402.  
  403. CTTY device                            redirect I/O other than CON
  404.  
  405. KEYBxx                                 international keyboard reassignment
  406.                                        xx = US FR SP IT UK GR
  407.  
  408. SELECT yyy xx                          select country & keyboard codes
  409.        (note - may also FORMAT disk)   yyy = 1 33 34 39 44 49
  410.  
  411. GRAFTABL                               use foreign chars (128-255) with graphics
  412.  
  413. GRAPHICS                               allow printing of graphic screens
  414. /R ..... B&W printed as is   /B ...... background color printed
  415.  
  416. EXE2BIN file1 file2                    convert .EXE file to .COM file
  417.  
  418. LINK file                              convert object file to .EXE file
  419.                                        file must contain needed link responses
  420.  
  421. Secondary Command Processor
  422. ===========================
  423. COMMAND ctty-device-name               use auxiliary command processor
  424. /P ..... load into memory    /C com .. execute command     /E=nnnn (envir size)
  425.  
  426. EXIT                                   return to prior COMMAND processor
  427.                                        (unless the /P was used)
  428.  
  429.  
  430.  
  431. XEROX Menu Commands
  432. ===================
  433. XMATE              main menu for all DOS commands
  434.  
  435. FDMAINT            menu for FORMAT DISKCOPY CHKDSK
  436.  
  437. HDMAINT            menu for FDISK FORMAT BACKUP RESTORE
  438.  
  439. SYSGEN             menu for SYS
  440.  
  441. CONFIGUR           menu for MODE
  442.  
  443. SETPTR             menu for printer translation
  444.  
  445. SOFTKEYS file      menu to redefine keys (except - Ctrl, Alt, Shift, Esc, Space,
  446.                    Caps Lock, Num Lock, Scroll Lock, Shift PrtSc, Ctrl Alt Del,
  447.                    Ctrl C, Ctrl 2)
  448.  
  449.  
  450.  
  451. NOTES
  452. =====
  453.  
  454.